﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace NNTH
{
    public partial class fPhong : DevExpress.XtraEditors.XtraForm
    {
        public fPhong()
        {
            InitializeComponent();
        }

        private void btnThem_Click(object sender, EventArgs e)
        {
            this.phongHocBindingSource.AddNew();
        }

        private void btnXoa_Click(object sender, EventArgs e)
        {
            this.phongHocBindingSource.RemoveCurrent();
        }

        private void btnLuu_Click(object sender, EventArgs e)
        {
            db.SaveChanges();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnPrint_Click(object sender, EventArgs e)
        {

        }

        Data.QLTTNNTHEntities db = new Data.QLTTNNTHEntities();
        private void fPhong_Load(object sender, EventArgs e)
        {
            this.phongHocBindingSource.DataSource = db.PhongHoc;
        }
    }
}